package com.sinaapp.mspring.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sinaapp.mspring.annotation.SystemServiceLog;
import com.sinaapp.mspring.mapper.IqiyiMapper;
import com.sinaapp.mspring.model.pojo.Iqiyi;
import com.sinaapp.mspring.service.IqiyiServiceI;
import com.sinaapp.mspring.model.vo.PageParameter;

/**
 * 爱奇艺影视播放量业务实现
 * @author binchao
 * 2016年3月13日
 */
@Service("iqiyiService")
public class IqiyiServiceImpl extends BaseServiceImpl<Iqiyi, Integer> implements IqiyiServiceI {

	@Autowired
	private IqiyiMapper iqiyiMapper;
	
	@Autowired
	public void setBaseMapper() {
		super.setBaseMapper(iqiyiMapper);
	}

	@Override
	@SystemServiceLog(description = "分页查询电影信息")
	public List<Iqiyi> selectList(PageParameter pageParameter) {
		Integer totolRecord = iqiyiMapper.count();
		pageParameter.setTotalRecord(totolRecord);
		List<Iqiyi> iqiyis = iqiyiMapper.selectList(pageParameter);
		return iqiyis;
	}

	@Override
	@SystemServiceLog(description = "主键查询电影信息")
	public Iqiyi selectByKey(Integer id) {
		
		return iqiyiMapper.selectByPrimaryKey(id);
	}

}
